<%--
  Created by IntelliJ IDEA.
  User: John
  Date: 2020/9/1
  Time: 17:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>用户列表</title>
    <jsp:include page="/common/header.jsp" />
    <link type="text/css" rel="stylesheet" href="${rootPath}/static/list.css">
</head>
<body>

    <table>
        <tr>
            <th>用户名</th>
            <th>昵称</th>
            <th>邮箱</th>
            <th>状态</th>
            <th>注册时间</th>
            <th>最后登录时间</th>
        </tr>
        <c:forEach items="${userList}" var="user">
            <tr>
                <td>${user.username}</td>
                <td>${user.nickname}</td>
                <td>${user.email}</td>
                <td>${user.status == 1 ? "正常" : "锁定"}</td>
                <td>
                    <fmt:formatDate value="${user.createTime}" pattern="yyyy-MM-dd HH:mm:ss" />
                </td>
                <td>
                    <fmt:formatDate value="${user.lastLoginTime}" pattern="yyyy-MM-dd HH:mm:ss" />
                </td>
            </tr>
        </c:forEach>
    </table>

</body>
</html>
